﻿using Data.Tables;
using PayrollExpress.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PayrollExpress.Models
{
    public class PayrollListModel: BaseModel
    {
        public PayrollListModel()
            : base(
                      BaseHelper.ControllerName.Workspace.ToString(),
                      BaseHelper.Page.Payroll.ToDescription()
                  )
        { }

        public int SelectedWorkLocationID { get; set; }

        public IEnumerable<SelectListItem> WorkLocations { get; set; }

        public List<PayrollQueryModel> ListItems { get; set; }
    }

    public class PayrollAddEditModel: BaseModel
    {
        public PayrollAddEditModel()
            : base(
                      BaseHelper.ControllerName.Workspace.ToString(),
                      new List<KeyValuePair<string, string>>() 
                      {
                        new KeyValuePair<string, string> ( BaseHelper.Page.Payroll.ToString(), BaseHelper.Page.Payroll.ToDescription())
                      },
                      BaseHelper.PageAddEditSave.PayrollAddEdit.ToDescription()
                  )
        { }

        public string WorkLocationName { get; set; }

        public Payroll Type { get; set; }

    }

    public class PayrollDetailListModel: BaseModel
    {
        public PayrollDetailListModel()
            : base(
                      BaseHelper.ControllerName.Workspace.ToString(),
                      BaseHelper.Page.PayrollDetails.ToDescription()
                  )
        { }

        public int PayrollID { get; set; }

        public string WorkLocationName { get; set; }

        public string CutOffStartDate { get; set; }

        public string CutOffEndDate { get; set; }

        public List<PayrollDetailQueryModel> ListItems { get; set; }
    }
    
}